package com.kfm.filter;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;

/**
 * 过滤器链执行顺序 注解形式--> 按照类的名字执行 A B C
 *          xml配置形式 --> 按照配置的顺序执行，谁在前面谁先执行
 */
//@WebFilter("/*")
public class BFilter implements Filter {
    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        System.out.println("B 执行");
        chain.doFilter(request, response);
        System.out.println("B 执行结束");
    }
}
